package club.banyuan.lambda.demo1;
import java.util.Arrays;
import java.util.List;

/**
 * @author edz
 * @version 1.0
 * @date 2020/12/4 上午9:35
 */
public class StreamAPI {
    List<Employee>  emps= Arrays.asList(
            new Employee(102, "李四", 59, 6666.66),
            new Employee(101, "张三", 18, 9999.99),
            new Employee(103, "王五", 28, 3333.33),
            new Employee(104, "赵六", 8, 7777.77),
            new Employee(104, "赵das六", 8, 7777.77),
            new Employee(104, "赵六", 8, 7777.77),
            new Employee(105, "田wqq七", 38, 5555.55)
    );

    public static void main(String[] args) {
//
//            emps.stream().filter(employee -> employee.getSalary()>5555.55).
//            limit(5).forEach(System.out::println);
    }





}
class Employee{
    private int number;
    private String name;
    private  int age;
    private double salary;

    public Employee() {
    }

    public Employee(int number, String name, int age, double salary) {
        this.number = number;
        this.name = name;
        this.age = age;
        this.salary = salary;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }
}
